package blog.service.impl;

import blog.entity.Link;
import blog.mapper.LinkMapper;
import blog.service.LinkService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class LinkServiceImpl implements LinkService {
    @Resource
    private LinkMapper linkMapper;
    @Override
    public List<Link> getLinkList() {
        return linkMapper.getLinkList();
    }

    @Override
    public void deleteLinkById(Integer id) {
        linkMapper.deleteLinkById(id);
    }

    @Override
    public Link getLinkById(Integer id) {
        return linkMapper.getLinkById(id);
    }

    @Override
    public void updateLink(Link link) {
        linkMapper.updateLink(link);
    }

    @Override
    public void addLink(Link link) {
        linkMapper.addLink(link);
    }
}
